<?php
hc_core_ClassLoader::load('halo_AbstractHandlerMapping');
abstract class halo_AbstractUrlHandlerMapping extends halo_AbstractHandlerMapping {

    protected $registeredHandlers;

    protected function initContext() {
        parent::initContext();
        $this->registerHandlers();
    }

    protected function registerHandler($urlPaths, $handlerName) {
        if ( ! is_array($urlPaths) ) $urlPaths = array($urlPaths);
        foreach ( $urlPaths as $urlPath ) {
            $this->registeredHandlers[$urlPath] = $handlerName;
        }
    }

    abstract protected function registerHandlers();

}
?>
